<extend name="common/base" />
<block name="resource">
    <link href="__PUBLIC__/Home/ui3/css/leftCommon.css?v=1.0.1" rel="stylesheet">
    <link href="__PUBLIC__/Home/ui3/css/home.css?v=1.0.1" rel="stylesheet">
    <link href="__PUBLIC__/Home/ui3/css/others.css?v=1.0.1" rel="stylesheet">

    <script src="__PUBLIC__/Home/ui3/js/jwplayer/jwplayer.js?v=1.0"></script>
    <!-- 表情核心JS -->
    <script src="__PUBLIC__/Home/ui3/js/face.js" type="text/javascript"></script>
    <!-- 分页JS -->
    <script src="__PUBLIC__/Home/ui3/js/web/paging.js" type="text/javascript"></script>
    <!-- 替换表情文字 -->
    <script src="__PUBLIC__/Home/ui3/js/web/emotion.js?v=1.0" type="text/javascript"></script>
    <script src="__PUBLIC__/Home/ui3/js/web/scroll.js?v=1.0" type="text/javascript"></script>

    <script src="__PUBLIC__/Home/ui3/js/web/home/others.js" type="text/javascript"></script>
    <script src="__PUBLIC__/Home/ui3/js/web/home/user.js?v=1.0" type="text/javascript"></script>
    <script src="__PUBLIC__/Home/ui3/js/web/home/recommend.js?v=1.0" type="text/javascript"></script>
    <script src="__PUBLIC__/Home/ui3/js/web/home/trade.js?v=1.0.5" type="text/javascript"></script>
    <script src="__PUBLIC__/Home/ui3/js/web/home/index.js?v=1.0.2" type="text/javascript"></script>
</block>

<block name="content">
    <div class="main">
        <div class="container">
        <include file="Others/left" />
            <div class="main-right">
                <div class="dongtai">
                    <div class="dongtai-box">
                        <div class="dongtai-num">
                            <span>TA的动态</span>
                            <span class="d-num">{$totalCount}条</span>
                        </div>
                    </div>
                </div>
                <!-- ko if:tradeList().length < 1-->
                <div class="content-right-item-null">
                    <div class="null-img"></div>
                    <div class="null-info">哎呀 TA没有动态</div>
                </div>
                <!-- /ko -->
                <div class="right-box" id="share" data-bind="foreach:tradeList">
                    <include file="Template/trade" />
                </div>
                <div class="load-more JS-trade_more" style="display: none;">
                    <i>
                        <img src="__PUBLIC__/Home/ui3/images/loading-white.gif" alt="正在加载，请稍候..."/>
                    </i>
                    <span>正在加载，请稍候...</span>
                </div>
            </div>
        </div>
        <div class="backTop" id="backTop" title="返回顶部">
            <a href="javascript:void(0);"></a>
        </div>
    </div>
</block>

<block name="init">
    <script type="text/javascript">
        is_other = true;
        window._THIS = {
            tradeUrl : "{:U('Others/index')}",
            setPlayUrl : "{:U('api/video/setPlay')}",
            videoLink : "/video-",
            matchLink : "/match-detail-",
            userLink : "/user-",
            favourUrl : {
                add : "{:U('favour/add')}",
                undo : "{:U('favour/undo')}",
            },
            likeUrl : {
                dolike : "{:U('like/dolike')}",
                unlike : "{:U('like/unlike')}",
            },
            followUrl : {
                dofollow : "{:U('follow/dofollow')}",
                unfollow : "{:U('follow/unfollow')}",
            },
            commentUrl : {
                get : "{:U('video/getCommentList')}",
                post : "{:U('video/comments')}",
            },
            commentPager : {$commentPager|intval}, //每页评论数量
            tradePending : false,
            relationVideoUrl : "{:U('share/video')}",
        };
        function dataInit() {
            var user = {$user|json_encode};
            viewModel.user(getOther(user));

            var self = {$self|json_encode};
            viewModel.self({
                'id' : self.id ? self.id : 0,
                'avatar' : self.avatar ? self.avatar : _COMMON.DEFAULT_AVATAR,
                'nickname' : self.nickname,
            });

            var trade = {$tradeList|json_encode};
            viewModel.tradeList(getTrade(trade));
            $('img.JS-lazyload').lazyload();
            emotionBind();
        }
    </script>
</block>